package com.boot.mgt.service.impl

import com.boot.mgt.dao.mysql.TaAppExceptionMsgMapper
import com.boot.mgt.model.TaAppExceptionMsg
import com.boot.mgt.service.TaAppExceptionMsgService
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service
import java.util.*

/**
 * @author kawins
 * createTime 2019-03-14 19:38
 */
@Service
class TaAppExceptionMsgServiceImpl : TaAppExceptionMsgService {

    @Autowired
    private lateinit var taAppExceptionMsgMapper: TaAppExceptionMsgMapper

    override fun insert(taAppExceptionMsg: TaAppExceptionMsg) {
        taAppExceptionMsg.createTime = Date()
        taAppExceptionMsgMapper.insert(taAppExceptionMsg)
    }

    override fun selectAll(): List<TaAppExceptionMsg> {
        return taAppExceptionMsgMapper.selectAll()
    }
}